using System;
using System.ComponentModel;

namespace SBPweb.Contracts.StateManagement
{
	public class ModeEventArgs : EventArgs
	{
		private Mode pNewMode;
		private Mode pOldMode;
		private bool pIsLocked;
		private TimeSpan pTimeout;
		private object pChangedBy;

		public ModeEventArgs(Mode newMode, Mode oldMode, bool isLocked, TimeSpan timeout, object changedBy)
		{
			pNewMode = newMode;
			pOldMode = oldMode;
			pIsLocked = isLocked;
			pTimeout = timeout;
			pChangedBy = changedBy;
		}

		public Mode NewMode
		{
			get
			{
				return pNewMode;
			}
			set
			{
				pNewMode = value;
			}
		}

		public Mode OldMode
		{
			get
			{
				return pOldMode;
			}
		}

		public bool IsLocked
		{
			get
			{
				return pIsLocked;
			}
		}

		public TimeSpan Timeout
		{
			get
			{
				return pTimeout;
			}
		}

		public object ChangedBy
		{
			get
			{
				return pChangedBy;
			}
		}
	}

	public class ModeChangingEventArgs : CancelEventArgs
	{
		private Mode pNewMode;
		private Mode pOldMode;
		private bool pIsLocked;
		private TimeSpan pTimeout;
		private object pChangedBy;

		public ModeChangingEventArgs(Mode newMode, Mode oldMode, bool isLocked, TimeSpan timeout, object changedBy)
		{
			pNewMode = newMode;
			pOldMode = oldMode;
			pIsLocked = isLocked;
			pTimeout = timeout;
			pChangedBy = changedBy;
		}

		public Mode NewMode
		{
			get
			{
				return pNewMode;
			}
			set
			{
				pNewMode = value;
			}
		}

		public Mode OldMode
		{
			get
			{
				return pOldMode;
			}
		}

		public bool IsLocked
		{
			get
			{
				return pIsLocked;
			}
		}

		public TimeSpan Timeout
		{
			get
			{
				return pTimeout;
			}
		}

		public object ChangedBy
		{
			get
			{
				return pChangedBy;
			}
		}
	}

}